<template>
<table>
    <tr>
        <td>用户借款编号</td>
        <td>借款用户账号</td>
        <td>借款款项名称</td>
        <td>借款金额</td>
        <td>剩余还款本金</td>
    </tr>
    <tr v-for="i in data">
        <td>{{ i.UB_Id }}</td>
        <td>{{ i.UL_Name }}</td>
        <td>{{ i.BM_Name }}</td>
        <td>{{ i.UBM_Money}}</td>
        <td>{{ i.UBM_RemaingAmount }}</td>
    </tr>
</table>
</template>
<script setup lang="ts">
import axios from 'axios';
import {ref,onMounted} from 'vue'
import { useRoute } from 'vue-router';
const route = useRoute()
const BM_Id=route.query.BM_Id
const data:any=ref([])
onMounted(()=>{
    SelectUserById()
})
const SelectUserById=()=>{
    axios.get('https://localhost:44358/api/Borrow/SelectUserById',
        {
            params:{
                BM_Id:route.query.BM_Id
            }
        }
    ).then(res=>{
        data.value=res.data
        console.log(data.value);
    }).catch(err=>{
        console.log(err);
    })
}
    

</script>